<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>数据显示表格</title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css" />
		<link rel="stylesheet" href="../js/easyui/themes/icon.css" />
		
		<script type="text/javascript">
			
			$(function(){
				// 页面加载后，对datagrid 进行设置
				$("#grid").datagrid({
					//设置表格属性
					columns : [[
						{field:"id",title:"编号",width:100},
						{field:"name",title:"商品名称",width:100},
						{field:"price",title:"商品价格",width:100}
					]],
					
					url : "product.json",
					pagination : true,
					toolbar:[
						{
							id : "saveBtn",
							text : "保存",
							iconCls : "icon-save",
							handler : function(){
								alert("保存");
							}
						}
					]
				});
			});
		</script>
	</head>

	<body >
		<table id="grid"></table>
	</body>	
</html>